import request from '@/utils/request'

// dormitories search 宿舍搜索
export function getDormitoryList(data) {
  return request({
    url: '/dormitories/search',
    method: 'post',
    data
  })
}

// dormitories add 宿舍新增
export function addDormitory(data) {
  return request({
    url: '/dormitories/add',
    method: 'post',
    data
  })
}

// dormitories delete 宿舍删除
export function deleteDormitory(params) {
  return request({
    url: '/dormitories/delete',
    method: 'post',
    params
  })
}

// dormitories update 宿舍更新
export function updateDormitory(data) {
  return request({
    url: '/dormitories/update',
    method: 'post',
    data
  })
}

// 获取所有宿舍
export function getAllDormitory() {
  return request({
    url: '/dormitories/get',
    method: 'get'
  })
}

